<template>
    <div class="box">
      <!--<div class=" downLoad" @click="downLoad">-->
        <!--证书下载-->
      <!--</div>-->
      <div class="myCert">证书查看</div>
      <div class="cert">
        <img :src=src alt="">
      </div>
    </div>
</template>

<script>
  import wx from 'weixin-js-sdk'
  import weixinshare from '../../common/js/certShare.js'
    export default {
      name: "CertDetail",
      data() {
        return {
          Id: '01',
          src:"",
          PB_ComAttSN:""
        }
      },
      created() {

        if (this.$route.query.Id) {
          this.Id = this.$route.query.Id
        }
        this.get_data()
      },
      methods: {
        get_data() {
          let me = this
          me.$Global.zcServer.Post({
            IsNeedLogin: 'false',
            Paras: {
              Name: 'Vue_Cert',
              Action: 'getP_CertBySingle',
              UserId: me.$Global.UserId,
              Data: {
                Id: me.Id
              }
            },
            Callback: me.cb_data,
            Scope: me
          });
        },
        cb_data(resJson, scope) {
          console.log('证书查看', resJson)
          if(resJson.success){
            this.src=resJson.data.VideoThumb
            this.PB_ComAttSN=resJson.data.PB_ComAttSN
          }
        },
        // downLoad(){
        //   let Server = "http://" + window.location.host + "/";
        //   window.open(Server+'PageService/doOSSDownload.ashx?pSN=' + this.PB_ComAttSN);
        // },

      }
    }
</script>

<style scoped>
.myCert{
  height: 40px;
  line-height: 40px;
  padding-left: 10px;
  background-color: #2ba9f0;
  color: white;
}
  .cert{
    padding-top: 20px;
    padding-bottom: 50px;
    background-color: white;

  }
.cert img{
  width: 100%;
}
</style>
